<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <script src="js/jquery-2.1.0.js"></script>
	<link rel="stylesheet" href="css/seller.css" />
    <script>
        $(function(){
            var oBtn = $("#btn");
            oBtn.click(function(){
                var sellerIdcare = $("input[name = 'sellerIdcare']").val();
                var sellerMail = $("input[name = 'sellerMail']").val();
                var sellerCity = $("input[name = 'sellerCity']").val();
                var userId = getUrl();
                $.ajax("/fengwei/Seller/register",{
                    type:"post",
                    data:{
                        'sellerIdcare':sellerIdcare,
                        'sellerMail':sellerMail,
                        'sellerCity':sellerCity,
                        'userId':userId
                    },
                    success:function(data){
//                      在这里注册成功后跳转页面
                        console.log(data);
                    },
                    error:function(){
                        alert(0);
                    }
                })
                function getUrl(){
                    var str = location.href;//获取传过来的地址
                    var arr = str.split("?");
                    var str1 = arr[1];//获取？之后的内容
                    userId = str1.split("=")[1];
                    return userId;
                }
            })
        })
    </script>
</head>
<body>

身份证：<input type="text" name="sellerIdcare"/>
邮箱：<input type="email" name="sellerMail"/>
城市：<input type="text" name="sellerCity"/>
<input type="button" value="tja" id="btn"/>

<div>

</div>
</body>
</html>